/**
 * 睡眠函数
 * @param {Number} n 间隔毫秒
 * @example
 * sleep(1000);
 * sleep(3000);
 * sleep(6000);
 */

export const sleep = (n = 3000) => {
	const now = Date.now();
	while (true) {
		if (Date.now() - n > now) break;
	}
};
